package com.qf.petmall.starter.homeclass.controller;



import com.qf.petmall.starter.homeclass.entity.Homeclass;
import com.qf.petmall.starter.homeclass.service.IHomeclassService;
import com.qf.petmall.starter.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.security.PublicKey;
import java.util.List;

/**
 * <p>
 * 商城页面的商品列表模块 前端控制器
 * </p>
 *
 * @author author
 * @since 2022-12-06
 */
@CrossOrigin
@RestController
@RequestMapping("/homeclass")
public class HomeclassController {

    @Autowired
    IHomeclassService iHomeclassService;

    @GetMapping("/gethomeclass")
    public R gethonme(){
        List<Homeclass> list = iHomeclassService.list();
        return R.ok().put("homeclass",list);
    }

}
